import React from "react";
import { withRouter } from "react-router-dom";
import { Tabs } from "antd-mobile";
function New(props) {
  let { news } = props;
  return (
    <div>
      <Tabs
        defaultActiveKey="1"
        onChange={(key) => {
          props.history.push("/list?id=" + key);
        }}
      >
        {news.map((item) => {
          return <Tabs.Tab title={item.goodsname} key={item.id}></Tabs.Tab>;
        })}
      </Tabs>
    </div>
  );
}
export default withRouter(New);
